Carbon


DMRemoveDisplay

Header: Displays.h Carbon status: Supported

Removes a video device from the device list.

OSErr DMRemoveDisplay (
    GDHandle removeDevice, 
    Handle displayState
);
Parameter descriptions
removeDevice

A handle to the GDevice structure for the video device you want to remove from the device list. The function DMRemoveDisplay does not actually dispose of this structure, but instead removes it from the device list.

displayState

If your application called DMBeginConfigureDisplays, you must pass the displayState handle obtained. Otherwise pass NULL in this parameter.

function result

A result code.

DISCUSSION

The function DMRemoveDisplay may call the function DMSetMainDisplay, which causes the removeDevice parameter to contain a handle to the GDevice structure for the new main screen, not the video device whose handle was passed to DMRemoveDisplay. To recover the GDevice structure for the disabled device, determine its display ID by using the function DMGetDisplayIDByGDevice before calling DMRemoveDisplay. Then use the function DMGetGDeviceByDisplayID to obtain the GDevice structure for the specified device.

You are not allowed to disable the last remaining display using the DMDisableDisplay function. Doing so will simply re-enable it. If you want to remove the last remaining display, thereby enabling the GDevice structure not associated with any video device, you must call DMRemoveDisplay.

SPECIAL CONSIDERATIONS

Because this function may move or purge memory blocks or access handles, you cannot call it at interrupt time.

Generally, your application should not use this function, but should instead allow system software to maintain the device list. This function is described here for completeness only.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)